package com.erp.sys.pojo;


import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.util.Date;
import java.util.List;


@Data
@AllArgsConstructor
@Accessors(chain = true)
@TableName(value = "sys_role")
public class Role implements Serializable {
    @TableField(exist = false)  // 当前属性不属于字段
    private static final long serialVersionUID=1L;

    @TableId(type = IdType.AUTO)
    private Integer id;

    private String name;
    private  String remark;
    private  int available;
    private Date createtime;

    /*一个角色  可能多个权限*/
    @TableField(exist = false)
    private Integer pid;
    @TableField(exist = false)
    private List<Permission> permissions;


    /*一个角色下，有多少用户*/
    @TableField(exist = false)
    private Integer uid;
    @TableField(exist = false)
    private List<User> users;







}
